import request from '/@/utils/request';

// 查询商家自有会员等级列表
export function listLevel(query?: Object) {
  return request({
    url: '/module/mer/self/vip/level/list',
    method: 'get',
    params: query
  })
}

// 查询商家自有会员等级详细
export function getLevel(id?: number) {
  return request({
    url: '/module/mer/self/vip/level/' + id,
    method: 'get'
  })
}

// 新增商家自有会员等级
export function addLevel(data?: Object) {
  return request({
    url: '/module/mer/self/vip/level',
    method: 'post',
    data: data
  })
}

// 修改商家自有会员等级
export function updateLevel(data?: Object) {
  return request({
    url: '/module/mer/self/vip/level',
    method: 'put',
    data: data
  })
}

// 删除商家自有会员等级
export function delLevel(id?: number) {
  return request({
    url: '/module/mer/self/vip/level/' + id,
    method: 'delete'
  })
}

// 导出商家自有会员等级
export function exportLevel(query?: Object) {
  return request({
    url: '/module/mer/self/vip/level/export',
    method: 'get',
    params: query
  })
}
